﻿#include<iostream>
#include<queue>

int main() {

	std::cout << "cpp queue" << std::endl;

	std::queue<int> myQueue;
	//插入
	myQueue.push(1);
	myQueue.push(2);
	myQueue.push(3);
	myQueue.push(4);
	myQueue.push(5);

	//访问队首尾
	std::cout << "Front: " << myQueue.front() << std::endl;
	std::cout << "Back: " << myQueue.back() << std::endl;

	//移除队首元素
	myQueue.pop();

	//遍历队列
	while (!myQueue.empty()) {
		std::cout << myQueue.front() << std::endl;
		//myQueue.pop();
	}
	


	std::cin.get();
}